<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>pynetconf: Session Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="libnetconf-logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">pynetconf
   </div>
   <div id="projectbrief">libnetconf wrapper for Python</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classnetconf_1_1_session.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="classnetconf_1_1_session-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Session Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Representation of a connection between a NETCONF server and client.  
 <a href="classnetconf_1_1_session.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac775ee34451fdfa742b318538164070e"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnetconf_1_1_session.html#ac775ee34451fdfa742b318538164070e">__init__</a></td></tr>
<tr class="memdesc:ac775ee34451fdfa742b318538164070e"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a> constructor.  <a href="#ac775ee34451fdfa742b318538164070e">More...</a><br/></td></tr>
<tr class="separator:ac775ee34451fdfa742b318538164070e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f3e881a92d7a1b4d6d07d9e63180c98"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnetconf_1_1_session.html#a0f3e881a92d7a1b4d6d07d9e63180c98">connect</a></td></tr>
<tr class="memdesc:a0f3e881a92d7a1b4d6d07d9e63180c98"><td class="mdescLeft">&#160;</td><td class="mdescRight">Placeholder for the client side session constructor.  <a href="#a0f3e881a92d7a1b4d6d07d9e63180c98">More...</a><br/></td></tr>
<tr class="separator:a0f3e881a92d7a1b4d6d07d9e63180c98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6e22d4565c88ace2af54703c335078c"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnetconf_1_1_session.html#ac6e22d4565c88ace2af54703c335078c">accept</a></td></tr>
<tr class="memdesc:ac6e22d4565c88ace2af54703c335078c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Placeholder for the server side session constructor.  <a href="#ac6e22d4565c88ace2af54703c335078c">More...</a><br/></td></tr>
<tr class="separator:ac6e22d4565c88ace2af54703c335078c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a293f6f53f6a9c7ee4f2682a82dbadd70"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnetconf_1_1_session.html#a293f6f53f6a9c7ee4f2682a82dbadd70">isActive</a></td></tr>
<tr class="memdesc:a293f6f53f6a9c7ee4f2682a82dbadd70"><td class="mdescLeft">&#160;</td><td class="mdescRight">Ask if the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a> is still active.  <a href="#a293f6f53f6a9c7ee4f2682a82dbadd70">More...</a><br/></td></tr>
<tr class="separator:a293f6f53f6a9c7ee4f2682a82dbadd70"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a444a1328efb32d5d9d2dcb2efe855d3b"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnetconf_1_1_session.html#a444a1328efb32d5d9d2dcb2efe855d3b">get</a></td></tr>
<tr class="memdesc:a444a1328efb32d5d9d2dcb2efe855d3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform the NETCONF &lt;get&gt; operation.  <a href="#a444a1328efb32d5d9d2dcb2efe855d3b">More...</a><br/></td></tr>
<tr class="separator:a444a1328efb32d5d9d2dcb2efe855d3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7fb9f6dde0b25e117c90c970617a9ec"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnetconf_1_1_session.html#ac7fb9f6dde0b25e117c90c970617a9ec">getConfig</a></td></tr>
<tr class="memdesc:ac7fb9f6dde0b25e117c90c970617a9ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform the NETCONF &lt;get-config&gt; operation.  <a href="#ac7fb9f6dde0b25e117c90c970617a9ec">More...</a><br/></td></tr>
<tr class="separator:ac7fb9f6dde0b25e117c90c970617a9ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8747df903dffb141cf840f4b85615897"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnetconf_1_1_session.html#a8747df903dffb141cf840f4b85615897">copyConfig</a></td></tr>
<tr class="memdesc:a8747df903dffb141cf840f4b85615897"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform the NETCONF &lt;copy-config&gt; operation.  <a href="#a8747df903dffb141cf840f4b85615897">More...</a><br/></td></tr>
<tr class="separator:a8747df903dffb141cf840f4b85615897"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a014494506770b54b73269f0d619dab81"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnetconf_1_1_session.html#a014494506770b54b73269f0d619dab81">deleteConfig</a></td></tr>
<tr class="memdesc:a014494506770b54b73269f0d619dab81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform the NETCONF &lt;delete-config&gt; operation.  <a href="#a014494506770b54b73269f0d619dab81">More...</a><br/></td></tr>
<tr class="separator:a014494506770b54b73269f0d619dab81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a385edea17818e832760ab81a7ac23e"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnetconf_1_1_session.html#a8a385edea17818e832760ab81a7ac23e">killSession</a></td></tr>
<tr class="memdesc:a8a385edea17818e832760ab81a7ac23e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform the NETCONF &lt;kill-session&gt; operation.  <a href="#a8a385edea17818e832760ab81a7ac23e">More...</a><br/></td></tr>
<tr class="separator:a8a385edea17818e832760ab81a7ac23e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e96581ff8cdfc7d6eebe4cb24cc496d"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnetconf_1_1_session.html#a5e96581ff8cdfc7d6eebe4cb24cc496d">lock</a></td></tr>
<tr class="memdesc:a5e96581ff8cdfc7d6eebe4cb24cc496d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Lock the specified NETCONF datastore.  <a href="#a5e96581ff8cdfc7d6eebe4cb24cc496d">More...</a><br/></td></tr>
<tr class="separator:a5e96581ff8cdfc7d6eebe4cb24cc496d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16f15e87b0eb67bc05c7b623ad15b90d"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnetconf_1_1_session.html#a16f15e87b0eb67bc05c7b623ad15b90d">unlock</a></td></tr>
<tr class="memdesc:a16f15e87b0eb67bc05c7b623ad15b90d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unlock the specified NETCONF datastore.  <a href="#a16f15e87b0eb67bc05c7b623ad15b90d">More...</a><br/></td></tr>
<tr class="separator:a16f15e87b0eb67bc05c7b623ad15b90d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8db582ad33cb6674c6819829d88912b3"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnetconf_1_1_session.html#a8db582ad33cb6674c6819829d88912b3">processRequest</a></td></tr>
<tr class="memdesc:a8db582ad33cb6674c6819829d88912b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unlock the specified NETCONF datastore.  <a href="#a8db582ad33cb6674c6819829d88912b3">More...</a><br/></td></tr>
<tr class="separator:a8db582ad33cb6674c6819829d88912b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:acf2488b95c97e0378c9bf49de3b50f28"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnetconf_1_1_session.html#acf2488b95c97e0378c9bf49de3b50f28">id</a></td></tr>
<tr class="memdesc:acf2488b95c97e0378c9bf49de3b50f28"><td class="mdescLeft">&#160;</td><td class="mdescRight">NETCONF Session id.  <a href="#acf2488b95c97e0378c9bf49de3b50f28">More...</a><br/></td></tr>
<tr class="separator:acf2488b95c97e0378c9bf49de3b50f28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a832ddc04754e8a43d4f3c6165b1294a7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnetconf_1_1_session.html#a832ddc04754e8a43d4f3c6165b1294a7">host</a></td></tr>
<tr class="memdesc:a832ddc04754e8a43d4f3c6165b1294a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Host where the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a> is connected.  <a href="#a832ddc04754e8a43d4f3c6165b1294a7">More...</a><br/></td></tr>
<tr class="separator:a832ddc04754e8a43d4f3c6165b1294a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8fb0f45ee0195c7422a49e6a8d72369"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnetconf_1_1_session.html#af8fb0f45ee0195c7422a49e6a8d72369">port</a></td></tr>
<tr class="memdesc:af8fb0f45ee0195c7422a49e6a8d72369"><td class="mdescLeft">&#160;</td><td class="mdescRight">Port number where the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a> is connected.  <a href="#af8fb0f45ee0195c7422a49e6a8d72369">More...</a><br/></td></tr>
<tr class="separator:af8fb0f45ee0195c7422a49e6a8d72369"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5cc32e366c87c4cb49e4309b75f57d64"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnetconf_1_1_session.html#a5cc32e366c87c4cb49e4309b75f57d64">user</a></td></tr>
<tr class="memdesc:a5cc32e366c87c4cb49e4309b75f57d64"><td class="mdescLeft">&#160;</td><td class="mdescRight">Username of the user connected with the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a>.  <a href="#a5cc32e366c87c4cb49e4309b75f57d64">More...</a><br/></td></tr>
<tr class="separator:a5cc32e366c87c4cb49e4309b75f57d64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a45e8fb7e1c3415e2b59b6437c832f4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnetconf_1_1_session.html#a5a45e8fb7e1c3415e2b59b6437c832f4">transport</a></td></tr>
<tr class="memdesc:a5a45e8fb7e1c3415e2b59b6437c832f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transport protocol used for the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a>.  <a href="#a5a45e8fb7e1c3415e2b59b6437c832f4">More...</a><br/></td></tr>
<tr class="separator:a5a45e8fb7e1c3415e2b59b6437c832f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c7a521b8f1a0769c09bfa4a1fca7dab"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnetconf_1_1_session.html#a4c7a521b8f1a0769c09bfa4a1fca7dab">version</a></td></tr>
<tr class="memdesc:a4c7a521b8f1a0769c09bfa4a1fca7dab"><td class="mdescLeft">&#160;</td><td class="mdescRight">NETCONF Protocol version used for the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a>.  <a href="#a4c7a521b8f1a0769c09bfa4a1fca7dab">More...</a><br/></td></tr>
<tr class="separator:a4c7a521b8f1a0769c09bfa4a1fca7dab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52fe932b48b649e02ac5d089750df3bc"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnetconf_1_1_session.html#a52fe932b48b649e02ac5d089750df3bc">capabilities</a></td></tr>
<tr class="memdesc:a52fe932b48b649e02ac5d089750df3bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">List of NETCONF capabilities assigned to the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a>.  <a href="#a52fe932b48b649e02ac5d089750df3bc">More...</a><br/></td></tr>
<tr class="separator:a52fe932b48b649e02ac5d089750df3bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Representation of a connection between a NETCONF server and client. </p>
<p>The constructor of the class can be used in two ways: a client side way (the host argument is set) and a server side way (the host argument is None). There are also class methods <a class="el" href="classnetconf_1_1_session.html#a0f3e881a92d7a1b4d6d07d9e63180c98" title="Placeholder for the client side session constructor. ">connect()</a> and <a class="el" href="classnetconf_1_1_session.html#ac6e22d4565c88ace2af54703c335078c" title="Placeholder for the server side session constructor. ">accept()</a> making usage of both approaches easier. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ac775ee34451fdfa742b318538164070e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def __init__ </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>host</em> = <code>None</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>port</em> = <code>830</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>user</em> = <code>None</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>transport</em> = <code><a class="el" href="namespacenetconf.html#a70c5be7db4485a438c4ee29c0d101ae3">netconf.TRANSPORT_SSH</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>capabilities</em> = <code>None</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>fd_in</em> = <code>-1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>fd_out</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a> constructor. </p>
<p>The parameters have different meaning for calling from client and server. Client side constructor requires the host argument while the server side constructor expects the host argument to be None. The <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a> class provides <a class="el" href="classnetconf_1_1_session.html#a0f3e881a92d7a1b4d6d07d9e63180c98" title="Placeholder for the client side session constructor. ">connect()</a> and <a class="el" href="classnetconf_1_1_session.html#ac6e22d4565c88ace2af54703c335078c" title="Placeholder for the server side session constructor. ">accept()</a> class functions for easier usage of the constructor.</p>
<p>For the client side, if the fd_in and fd_out arguments are specified, arguments host, port, user and transport are only informative. They are not used to establish a connection. In this case the function starts with writing the NETCONF &lt;hello&gt; message to the fd_out and expecting the server's &lt;hello&gt; message (in plain text) in fd_in.</p>
<p>For the server side, these arguments are set STDIN_FILENO and STDOUT_FILENO by default.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">host</td><td>Client side mandatory argument specifying a domain name or an IP address of the NETCONF server host where to connect. </td></tr>
    <tr><td class="paramname">port</td><td>Port where to connect, if not specified, default NETCONF port value 830 is used. </td></tr>
    <tr><td class="paramname">user</td><td>Username of the session holder. For the client side, it is used to connect to the remote host, for the server side it is used to get correct access rights. In both cases, if not specified, it is extracted from the process UID. </td></tr>
    <tr><td class="paramname">transport</td><td>NETCONF transport protocol specified as one of the NETCONF transport protocol constants. </td></tr>
    <tr><td class="paramname">capabilities</td><td>The list of NETCONF capabilities announced to the other side. By default, the internal list, as set by <a class="el" href="namespacenetconf.html#abd0c16242144340a41815e5f488150a6" title="Set the list of default NETCONF capabilities used for all actions where required. ...">setCapabilities()</a> function. </td></tr>
    <tr><td class="paramname">fd_in</td><td>File descriptor for reading NETCONF data from. </td></tr>
    <tr><td class="paramname">fd_out</td><td>File descriptor for writing NETCONF data to. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Created NETCONF <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a> object. </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ac6e22d4565c88ace2af54703c335078c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def accept </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>user</em> = <code>None</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>capabilities</em> = <code>None</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>fd_in</em> = <code>STDIN_FILENO</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>fd_out</em> = <code>STDOUT_FILENO</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Placeholder for the server side session constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">user</td><td>Username of the session holder, used to get correct access rights. If not specified, it is extracted from the process UID. </td></tr>
    <tr><td class="paramname">capabilities</td><td>The list of NETCONF capabilities announced to the client side. By default, the internal list, as set by <a class="el" href="namespacenetconf.html#abd0c16242144340a41815e5f488150a6" title="Set the list of default NETCONF capabilities used for all actions where required. ...">setCapabilities()</a> function. </td></tr>
    <tr><td class="paramname">fd_in</td><td>File descriptor for reading NETCONF data from. By default, the NETCONF data are read from the standard input. </td></tr>
    <tr><td class="paramname">fd_out</td><td>File descriptor for writing NETCONF data to. By default, the NETCONF data are written to the standard output. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a0f3e881a92d7a1b4d6d07d9e63180c98"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def connect </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>port</em> = <code>830</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>user</em> = <code>None</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>transport</em> = <code><a class="el" href="namespacenetconf.html#a70c5be7db4485a438c4ee29c0d101ae3">netconf.TRANSPORT_SSH</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>version</em> = <code>None</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>fd_in</em> = <code>-1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>fd_out</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Placeholder for the client side session constructor. </p>
<p>The <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a> class function.</p>
<p>When the fd_in and fd_out arguments are specified, arguments host, port, user and transport are only informative. They are not used to establish a connection. In this case the function starts with writing the NETCONF &lt;hello&gt; message to the fd_out and expecting the server's &lt;hello&gt; message (in plain text) in fd_in.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">host</td><td>Mandatory argument specifying a domain name or an IP address of the NETCONF server host where to connect. </td></tr>
    <tr><td class="paramname">port</td><td>Port where to connect, if not specified, default NETCONF port value 830 is used. </td></tr>
    <tr><td class="paramname">user</td><td>Username used for authentication when connecting to the remote host. If not specified, it is extracted from the process UID. </td></tr>
    <tr><td class="paramname">transport</td><td>NETCONF transport protocol specified as one of the NETCONF transport protocol constants. </td></tr>
    <tr><td class="paramname">version</td><td>Supported NETCONF protocol version specified as the NETCONF capability value. It can be specified as one of the NETCONF version constants <a class="el" href="namespacenetconf.html#a8773b2610e0b3ecada9d4ffff0c8b2bf" title="NETCONF version constant. ">netconf::NETCONFv1_0</a> or <a class="el" href="namespacenetconf.html#af6594393ab323d02b1429f49f2561699" title="NETCONF version constant. ">netconf::NETCONFv1_1</a>. By default, the supported protocol versions are decided from the capabilities list provided by the <a class="el" href="namespacenetconf.html#a069c23be3b5b8b1ea4d869e60828f056" title="Get the list of default NETCONF capabilities used for all actions where required. ...">getCapabilities()</a> function. During the NETCONF protocol handshake the highest common protocol version for both the server and client is selected for further communication. </td></tr>
    <tr><td class="paramname">fd_in</td><td>File descriptor for reading NETCONF data from. If set, the transport connection must be already established including the user authentication. </td></tr>
    <tr><td class="paramname">fd_out</td><td>File descriptor for writing NETCONF data to. If set, the transport connection must be already established including the user authentication. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Created NETCONF <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a> object. </dd></dl>

</div>
</div>
<a class="anchor" id="a8747df903dffb141cf840f4b85615897"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def copyConfig </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>target</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>wd</em> = <code>None</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Perform the NETCONF &lt;copy-config&gt; operation. </p>
<p>This function is supposed for the client side only.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>Source datastore of the data to copy. The value can be one of the <a class="el" href="namespacenetconf.html#aa00a8e9e1acea29817da05ab4682fe4c" title="NETCONF datastores constant. ">netconf::RUNNING</a>, <a class="el" href="namespacenetconf.html#a717829ae9572b70a012fd2910ceed029" title="NETCONF datastores constant. ">netconf::STARTUP</a> and <a class="el" href="namespacenetconf.html#a32542093882c25b0830f06cae1ee2256" title="NETCONF datastores constant. ">netconf::CANDIDATE</a>, the URL string if the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a> supports the NETCONF :url capability or the complete configuration datastore content provided as a string. </td></tr>
    <tr><td class="paramname">target</td><td>Target datastore where copy the data. The value of the argument is one of the datastore constants or the URL string if the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a> supports the NETCONF :url capability. </td></tr>
    <tr><td class="paramname">wd</td><td>The NETCONF :with-defaults mode. Possible values are provided as the WD_* constants of the <a class="el" href="namespacenetconf.html">netconf</a> module. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a014494506770b54b73269f0d619dab81"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def deleteConfig </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>target</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Perform the NETCONF &lt;delete-config&gt; operation. </p>
<p>This function is supposed for the client side only.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">target</td><td>Target datastore to be removed. Accepted values are the datastore constants or the URL string if the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a> supports the NETCONF :url capability. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a444a1328efb32d5d9d2dcb2efe855d3b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def get </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>filter</em> = <code>None</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>wd</em> = <code>None</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Perform the NETCONF &lt;get&gt; operation. </p>
<p>This function is supposed for the client side only.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filter</td><td>Optional string representing NETCONF Subtree filter. </td></tr>
    <tr><td class="paramname">wd</td><td>The NETCONF :with-defaults mode. Possible values are provided as the WD_* constants of the <a class="el" href="namespacenetconf.html">netconf</a> module. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The result data as a string. </dd></dl>

</div>
</div>
<a class="anchor" id="ac7fb9f6dde0b25e117c90c970617a9ec"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def getConfig </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>filter</em> = <code>None</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>wd</em> = <code>None</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Perform the NETCONF &lt;get-config&gt; operation. </p>
<p>This function is supposed for the client side only.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>The datastore where to query. Possible values are <a class="el" href="namespacenetconf.html#aa00a8e9e1acea29817da05ab4682fe4c" title="NETCONF datastores constant. ">netconf::RUNNING</a>, <a class="el" href="namespacenetconf.html#a717829ae9572b70a012fd2910ceed029" title="NETCONF datastores constant. ">netconf::STARTUP</a> and <a class="el" href="namespacenetconf.html#a32542093882c25b0830f06cae1ee2256" title="NETCONF datastores constant. ">netconf::CANDIDATE</a>. To allow the last two values, the appropriate NETCONF capability must be supported by the connected server. </td></tr>
    <tr><td class="paramname">filter</td><td>Optional string representing NETCONF Subtree filter. </td></tr>
    <tr><td class="paramname">wd</td><td>The NETCONF :with-defaults mode. Possible values are provided as the WD_* constants of the <a class="el" href="namespacenetconf.html">netconf</a> module. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The result data as a string. </dd></dl>

</div>
</div>
<a class="anchor" id="a293f6f53f6a9c7ee4f2682a82dbadd70"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def isActive </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Ask if the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a> is still active. </p>
<p>This function is generic for both the client and the server side.</p>
<dl class="section return"><dt>Returns</dt><dd>True if the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a> is still connected. If the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a> was closed (due to error or close request from the client), the False is returned. </dd></dl>

</div>
</div>
<a class="anchor" id="a8a385edea17818e832760ab81a7ac23e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def killSession </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Perform the NETCONF &lt;kill-session&gt; operation. </p>
<p>This function is supposed for the client side only.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">id</td><td>String with the ID of a NETCONF Session to kill. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a5e96581ff8cdfc7d6eebe4cb24cc496d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def lock </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>target</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Lock the specified NETCONF datastore. </p>
<p>This function is supposed for the client side only.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">target</td><td>The datastore to lock, accepted values are the datastore constants. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a8db582ad33cb6674c6819829d88912b3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def processRequest </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Unlock the specified NETCONF datastore. </p>
<p>This function is supposed for the server side only.</p>
<p>It automatically process the next request from the NETCONF client connected via the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a>. After the processing RPC, the caller should check if the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a> wasn't closed using the <a class="el" href="classnetconf_1_1_session.html#a293f6f53f6a9c7ee4f2682a82dbadd70" title="Ask if the Session is still active. ">isActive()</a> method. </p>

</div>
</div>
<a class="anchor" id="a16f15e87b0eb67bc05c7b623ad15b90d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def unlock </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>target</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Unlock the specified NETCONF datastore. </p>
<p>This function is supposed for the client side only.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">target</td><td>The datastore to lock, accepted values are the datastore constants. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a52fe932b48b649e02ac5d089750df3bc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">capabilities</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>List of NETCONF capabilities assigned to the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a>. </p>

</div>
</div>
<a class="anchor" id="a832ddc04754e8a43d4f3c6165b1294a7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">host</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Host where the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a> is connected. </p>

</div>
</div>
<a class="anchor" id="acf2488b95c97e0378c9bf49de3b50f28"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">id</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>NETCONF Session id. </p>
<p>Read-only. </p>

</div>
</div>
<a class="anchor" id="af8fb0f45ee0195c7422a49e6a8d72369"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">port</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Port number where the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a> is connected. </p>

</div>
</div>
<a class="anchor" id="a5a45e8fb7e1c3415e2b59b6437c832f4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">transport</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Transport protocol used for the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a>. </p>

</div>
</div>
<a class="anchor" id="a5cc32e366c87c4cb49e4309b75f57d64"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">user</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Username of the user connected with the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a>. </p>

</div>
</div>
<a class="anchor" id="a4c7a521b8f1a0769c09bfa4a1fca7dab"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">version</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>NETCONF Protocol version used for the <a class="el" href="classnetconf_1_1_session.html" title="Representation of a connection between a NETCONF server and client. ">Session</a>. </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacenetconf.html">netconf</a></li><li class="navelem"><a class="el" href="classnetconf_1_1_session.html">Session</a></li>
    <li class="footer">Generated on Thu Nov 6 2014 10:42:36 for pynetconf by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.5 </li>
  </ul>
</div>
</body>
</html>
